import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Dialog {
    id: messageDialog
    title: "消息提示"
    modal: true
    standardButtons: Dialog.Ok | Dialog.Cancel

    property alias messageText: messageLabel.text
    
    ColumnLayout {
        anchors.fill: parent
        spacing: 20

        Image {
            Layout.alignment: Qt.AlignHCenter
            source: "images/info.png"
            width: 48
            height: 48
        }

        Label {
            id: messageLabel
            text: "这是一个基本的消息对话框"
            wrapMode: Text.WordWrap
            Layout.fillWidth: true
            horizontalAlignment: Text.AlignHCenter
        }
    }

    onAccepted: console.log("确认按钮被点击")
    onRejected: console.log("取消按钮被点击")
} 
